import {get, post} from './api'

export const requestIndex = (pageIndex,pageSize) => {
     return post('/bing/image/query',{
        "pageIndex":pageIndex,
        "pageSize":pageSize
    }).then(res => res.data)
}


export const postView = (date) => {
    const url = '/bing/image/pv/{date}'
    return get(url.replace('{date}', date))
    .then(res => res.data)
}

export const postLike = (date) => {
    const url = '/bing/image/like/{date}'
    return get(url.replace('{date}', date))
    .then(res => res.data)
}
